﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RecipeMLSchema.Schema;

namespace RecipeML
{
	/// <summary>
	/// The original Recipe XMl Schema classes are not very useful, so 
	/// add another layer here that makes them easier to manipulate.
	/// </summary>
	public class Recipe
	{
		private recipeml _recipeml;

		public Recipe(string pFileName)
		{
			_recipeml = SerializationHelper.FromFile<recipeml>(pFileName);
		}

		/// <summary>
		/// Title of this recipe
		/// </summary>
		public string Title
		{
			get { return _recipeml.recipe.head.title.text[0]; }
			set { _recipeml.recipe.head.title.text[0] = value; }
		}
	}
}
